package llama.ctrl;

import llama.core.ChatModelLocator;
import llama.util.SystemMessage;

public class NavigationCtrl implements IController {
	public enum NavigationType {
		BACK,
		SEARCH
	}
	
	private NavigationType type;
	
	@Override
	public void execute() {
		switch(type){
			case BACK:
				ChatModelLocator.getChatModel().send(new SystemMessage(null, SystemMessage.Type.BACK_TO_CONTACT_LIST));
				break;
			case SEARCH:
				ChatModelLocator.getChatModel().send(new SystemMessage(null, SystemMessage.Type.SHOW_SEARCH_WINDOW));
				break;
		}
	}
	
	public void setNavigation(NavigationType type){
		this.type = type;
	}
}
